<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            height: 3000px;
            background-color: palegoldenrod;
        }
        button{
            position: fixed;
            bottom: 20px;
        }
    </style>
    
</head>
<body>
    <!-- <table>
        <caption>****学生信息表</caption>
        <thead>
            <tr>
                <th>字段名</th>
                <th>数据类型</th>
                <th>是否可以为空</th>
                <th>备注</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>id</td>
                <td>int</td>
                <td>否</td>
                <td>学号，自动自增</td>
            </tr>
            <tr>
                <td>name</td>
                <td>varchar</td>
                <td>否</td>
                <td>学生姓名</td>
            </tr>
            <tr>
                <td>age</td>
                <td>int</td>
                <td>否</td>
                <td>学生的年龄</td>
            </tr>
            <tr>
                <td>sex</td>
                <td>int</td>
                <td>否</td>
                <td>0为女，1为男</td>
            </tr>
            <tr>
                <td>city</td>
                <td>archar</td>
                <td>否</td>
                <td>所在城市</td>
            </tr>
            <tr>
                <td>joinDate</td>
                <td>date</td>
                <td>否</td>
                <td>入学时间</td>
            </tr>
            
        </tbody>
       
    </table> -->
    <div id="main" style="width: 600px;height:400px;"></div>
    <script src="echarts.min.js"></script>
   <script>
        //  btn = document.getElementsByTagName("button")[0]
        //  console.log(btn)
        //  btn.onclick = function(){
        //     window.scroll(0,0)
        //  }
  
   </script>

<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        title: {
            text: 'ECharts 入门示例'
        },
        tooltip: {},
        legend: {
            data:['销量']
        },
        xAxis: {
            data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
        },
        yAxis: {},
        series: [{
            name: '销量',
            type: 'bar',
            data: [5, 20, 36, 10, 10, 20]
        }]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</body>
</html>